package net.tavion.angelboot.bsm.controller;

import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponse;
import lombok.extern.slf4j.Slf4j;
import net.tavion.angelboot.bsm.dto.*;
import net.tavion.angelboot.common.vo.GenericResponse;
import org.springframework.web.bind.annotation.*;
import reactor.core.publisher.Mono;

@RestController
@RequestMapping("bsm/")
@Slf4j
public class BsmOperatorController {

    @ApiOperation(value = "操作员登录校验", notes = "网关调用")
    @ApiResponse(code = 200, message = "操作员登录校验")
    @PostMapping("/userlogin")
    public GenericResponse<CustomerLoginRspDTO> login(@RequestBody CustomerLoginReqDTO loginParams){
        log.info("=========================username================={}",loginParams.getUsername());
        log.info("=========================password================={}",loginParams.getPassword());


        CustomerLoginRspDTO customerLoginRspDTO=new CustomerLoginRspDTO();
        customerLoginRspDTO.setUsername(loginParams.getUsername());
        customerLoginRspDTO.setLoginUsername("tavion00");
        customerLoginRspDTO.setValidPassword("12345");
        return new GenericResponse(customerLoginRspDTO) ;
    }


}
